package org.springblade.common.mq;

import cn.hutool.core.date.DateUtil;
import com.github.thierrysquirrel.annotation.CommonMessage;
import com.github.thierrysquirrel.annotation.RocketMessage;
import com.github.thierrysquirrel.core.producer.MessageSendType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


/**
 * @Description 发送消息到MQ(测试环境)
 * @Author ysq
 * @Date 2023/6/19
 **/
@Slf4j
@Component
@RocketMessage(groupID = "GID_RESCUE_TEST")
public class TestMessageSend {

	/**
	 * 救援消息推送
	 * @param message
	 * @return
	 */
	@CommonMessage(topic = "rescue_notice_test", tag = "rescue",messageSendType = MessageSendType.SEND_ASYNC)
	public String rescueMessage(String message) {
		log.info("test-发送时间:[{}],发送内容:[{}]", DateUtil.now(), message);
		return message;
	}
}
